package com.itheima.output;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Arrays;

public class OutputDemo02 {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos = new FileOutputStream("day12_file&字节流\\stu.txt");

        String s = "张三,23,男,合肥";
        byte[] bytes = s.getBytes();
        System.out.println(Arrays.toString(bytes));
        fos.write(bytes);
//        fos.write(bytes,1,3);
//        fos.write("张三,23,男,合肥".getBytes());

        fos.close();
    }
}
